package com.bootdo.system.service;

import com.bootdo.common.utils.R;
import com.bootdo.system.domain.FileShareDO;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;

/**
 * 
 * 
 * @author chglee
 * @email 1992lcg@163.com
 * @date 2020-09-25 17:21:53
 */
public interface FileShareService {
	
	FileShareDO get(Long id);
	
	List<FileShareDO> list(Map<String, Object> map);
	
	int count(Map<String, Object> map);
	
	int save(FileShareDO fileShareDO);
	
	int update(FileShareDO fileShareDO);
	
	int remove(Long id);
	
	int batchRemove(Long[] ids);

	/**
	 * 生成文件分享链接
	 * @param fileShareDO
	 * @return
	 */
    R createShareLink(FileShareDO fileShareDO);

    R downloadFile(FileShareDO fileShareDO, HttpServletRequest request, HttpServletResponse response);

	R judeDownloadFile(FileShareDO fileShareDO);

	/**
	 * 根据加密链接地址获取分享详情
	 * @param shareLinkMd5
	 * @return
	 */
	FileShareDO getDetailByshareLinkMd5(String shareLinkMd5);
}
